\ todo: need to check for units as well, like when player is controlling a creature
1561{
1562
1563
1564
1566 {
1568 {
1570 {
1571#if VERSION_STRING >= WotLK
1572
1575#endif
1576
1577
1579 {
1582 else
1584 }
1585 }
1586
1587
1588
1589
1591 {
1594 else
1596 }
1597 }
1598
1599#if VERSION_STRING >= WotLK
1601 {
1603 return SPELL_FAILED_CUSTOM_ERROR;
1604 }
1605#endif
1606
1607
1609 {
1610#if VERSION_STRING >= TBC
1611
1613 {
1614
1617 return SPELL_FAILED_NOT_IN_ARENA;
1618 }
1619#endif
1620
1621
1624 }
1626 {
1628 }
1629
1630
1632 {
1633
1634
1635
1638 }
1639
1640
1643 }
1644
1646 {
1647
1649 {
1650
1653 }
1654
1655
1658
1659 auto requireCombat = true;
1660#if VERSION_STRING >= WotLK
1662 {
1664 {
1665 if (aurEff->getAura()->getSpellInfo()->isAuraEffectAffectingSpell(aurEff->getAuraEffectType(),
getSpellInfo()))
1666 {
1667
1668
1670
1671
1672
1673 if (aurEff->getAura()->getSpellInfo()->getEffectMiscValue(0) == 1)
1674 {
1675 requireCombat = false;
1676 break;
1677 }
1678 }
1679 }
1680 }
1681#endif
1682
1683
1688
1689
1693 {
1694
1695
1697 {
1700 }
1702 {
1704 }
1705 }
1706
1708 {
1709
1712
1713 if (!secondCheck)
1714 {
1715
1716#if VERSION_STRING >= WotLK
1717 auto hasIgnoreShapeshiftAura = false;
1719 {
1720
1721
1723 {
1724 hasIgnoreShapeshiftAura = true;
1725 break;
1726 }
1727 }
1728
1729 if (!hasIgnoreShapeshiftAura)
1730#endif
1731 {
1734 return shapeError;
1735
1736
1739 }
1740 }
1741 }
1742 }
1743
1744
1745 if (
worldConfig.terrainCollision.isCollisionEnabled)
1746 {
1750
1754 }
1755
1756
1757
1758
1760
1761
1763 {
1767 return targetCheck;
1768 }
1769
1770
1772 if (target != nullptr)
1773 {
1774
1775
1777 {
1780 return targetCheck;
1781 }
1782
1783
1788
1789
1793 {
1794
1795
1797 {
1798 if (target->hasAurasWithId(61987))
1800 }
1801 else if (target->hasAurasWithId(
getSpellInfo()->getTargetAuraSpellNot()))
1802 {
1804 }
1805 }
1806
1807 if (target->isCorpse())
1808 {
1809
1810 const auto targetCorpse =
sObjectMgr.getCorpseByOwner(target->getGuidLow());
1811 if (targetCorpse ==
nullptr || !targetCorpse->IsInWorld() || targetCorpse->getCorpseState() ==
CORPSE_STATE_BONES)
1813 }
1814
1817
1818
1821
1824
1826 {
1829 }
1830 else
1831 {
1834 }
1835
1836
1839
1840
1842 {
1845 }
1846
1848 {
1850 {
1851
1852 if (target->isCreature())
1853 {
1856 }
1857
1858
1859
1860
1863
1864
1866 {
1867#if VERSION_STRING == Classic
1869#else
1870 return SPELL_FAILED_BM_OR_INVISGOD;
1871#endif
1872 }
1873
1874
1876 {
1878
1879 if (targetUnit == nullptr)
1880 {
1883 }
1884
1885 if (targetUnit == nullptr)
1886 {
1889 }
1890
1891 const auto creatureTarget = targetUnit->isCreature() ?
dynamic_cast<Creature*
>(targetUnit) : nullptr;
1892 if (creatureTarget == nullptr)
1893 {
1896 }
1897
1898 if (!creatureTarget->isAlive())
1899 {
1902 }
1903
1904 if (creatureTarget->isPet())
1905 {
1908 }
1909
1910 if (creatureTarget->GetCreatureProperties()->Type !=
UNIT_TYPE_BEAST || creatureTarget->GetCreatureProperties()->Family == 0 || !(creatureTarget->GetCreatureProperties()->typeFlags &
CREATURE_FLAG1_TAMEABLE))
1911 {
1914 }
1915
1917 {
1920 }
1921
1923 {
1926 }
1927
1929 {
1932 }
1933
1935 {
1938 }
1939
1940#if VERSION_STRING >= WotLK
1941
1943 {
1946 }
1947#endif
1948
1949
1950 const auto creatureFamily =
sCreatureFamilyStore.lookupEntry(creatureTarget->GetCreatureProperties()->Family);
1951 if (creatureFamily == nullptr || creatureFamily->tameable == 0)
1952 {
1955 }
1956 }
1957 }
1958
1959
1961 {
1962
1963
1965 {
1968 }
1969
1970
1972 {
1975 }
1976
1977
1979 {
1980
1982#if VERSION_STRING >= TBC
1983
1985#endif
1986#if VERSION_STRING >= WotLK
1987
1989#endif
1990 )
1992 }
1993
1994
1997 }
1998
1999
2003
2006
2007
2009 {
2013 }
2014
2015 if (target->isPlayer())
2016 {
2017
2018
2019 const auto targetPlayer =
dynamic_cast<Player*
>(target);
2021 {
2023 {
2024 if (targetPlayer->getDuelPlayer() != playerOwner && playerOwner->isFriendlyTo(targetPlayer))
2026 }
2027 }
2028
2029
2030
2032 {
2033 if (targetPlayer->getDuelPlayer() != playerOwner && !playerOwner->isFriendlyTo(targetPlayer))
2034 {
2038 }
2039 }
2040
2041
2042
2045 }
2047 {
2048
2049
2052 }
2053
2054
2058
2059
2060
2063 }
2064 }
2065
2067 {
2068
2070 {
2072 if (pet != nullptr)
2073 {
2074 if (pet->isAlive())
2076 }
2077 else
2078 {
2079
2080 auto foundDeadPet = false;
2081 for (
const auto& [petSlot, petId] :
p_caster->getPetCachedSlotMap())
2082 {
2084 break;
2085
2087 if (petCache == nullptr)
2088 continue;
2089
2090 if (!petCache->alive)
2091 {
2092 foundDeadPet = true;
2093
2095 break;
2096 }
2097 }
2098
2099
2100 if (!foundDeadPet)
2102 }
2103 }
2104
2105
2107 {
2109 {
2111 if (pet == nullptr)
2113 else if (!pet->isAlive())
2115
2117 {
2121 }
2122 }
2123 }
2124 }
2125
2126
2127
2128
2129
2131 {
2135 }
2136
2138 {
2139
2141 {
2143 if (areaEntry == nullptr)
2145 if (areaEntry == nullptr)
2147
2149#if VERSION_STRING == TBC
2150 if (requireAreaId != areaEntry->id && requireAreaId != areaEntry->zone)
2151 {
2154 }
2155#elif VERSION_STRING >= WotLK
2156 auto found = false;
2158 while (areaGroup != nullptr)
2159 {
2160 for (const auto& i : areaGroup->AreaId)
2161 {
2162 if (i == areaEntry->id || (areaEntry->zone != 0 && i == areaEntry->zone))
2163 {
2164 found = true;
2165 *parameter1 = 0;
2166 break;
2167 }
2168 else if (i != 0)
2169 {
2170 *parameter1 = i;
2171 }
2172 }
2173
2174 if (found || areaGroup->next_group == 0)
2175 break;
2176
2178 }
2179
2180 if (!found)
2182#endif
2183 }
2184
2185
2187 {
2189 {
2192 }
2193 }
2194
2195
2196
2198 {
2200 {
2202 }
2203 else
2204 {
2207 }
2208 }
2209
2210
2212 {
2214 {
2215#if VERSION_STRING < WotLK
2217#else
2218 return SPELL_FAILED_NOT_IN_RAID_INSTANCE;
2219#endif
2220 }
2221 }
2222 }
2223
2224
2225
2226
2229 return itemCastResult;
2230
2232 {
2235 return casterStateResult;
2236
2239 return rangeResult;
2240
2243 return powerResult;
2244 }
2245
2246
2247
2248
2250 {
2251 auto found = false;
2252 for (
const auto& itr :
p_caster->getInRangeObjectsSet())
2253 {
2254 if (itr == nullptr || !itr->isGameObject())
2255 continue;
2256
2257 if (
const auto obj =
dynamic_cast<GameObject*
>(itr))
2258 {
2260 continue;
2261
2262
2264 continue;
2265
2266 const auto gameObjectInfo = obj->GetGameObjectProperties();
2267 if (gameObjectInfo == nullptr)
2268 {
2269 sLogger.debugFlag(
AscEmu::Logging::LF_SPELL,
"Spell::canCast : Found gameobject entry {} with invalid gameobject properties, spawn id {}", obj->getEntry(), obj->getGuidLow());
2270 continue;
2271 }
2272
2273
2274
2276 if (gameObjectInfo->spell_focus.distance > 0)
2277 {
2278
2279 distance =
static_cast<float_t
>(gameObjectInfo->spell_focus.distance);
2280 }
2281 else
2282 {
2285 }
2286
2287
2288 if (!
p_caster->
isInRange(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), distance))
2289 continue;
2290
2291 if (gameObjectInfo->spell_focus.focus_id ==
getSpellInfo()->getRequiresSpellFocus())
2292 {
2293 found = true;
2294 break;
2295 }
2296 }
2297 }
2298
2299 if (!found)
2300 {
2303 }
2304 }
2305
2306
2307
2308
2310 {
2311
2312 float_t range = 0.0f;
2314 if (rangeEntry != nullptr)
2315 range = rangeEntry->maxRange;
2316
2317 auto foundTarget = false;
2318
2319
2321 {
2323 {
2324
2325
2327 if (creatureTarget != nullptr)
2328 {
2329
2330 if (
m_caster->
isInRange(creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), range * range))
2331 {
2333 foundTarget = true;
2334 break;
2335 }
2336 }
2337 }
2338 else
2339 {
2340
2341
2342 Unit* creatureTarget =
nullptr;
2344 {
2345
2347 }
2349 {
2350
2352 if (creatureTarget == nullptr)
2354 }
2355
2356 if (creatureTarget == nullptr)
2357 continue;
2358
2361
2362
2365
2366
2368 foundTarget = true;
2369 break;
2370 }
2371 }
2372
2373
2375 {
2377 {
2378
2379
2381 if (gobTarget != nullptr)
2382 {
2383
2384 if (
m_caster->
isInRange(gobTarget->GetPositionX(), gobTarget->GetPositionY(), gobTarget->GetPositionZ(), range * range))
2385 {
2387 foundTarget = true;
2388 }
2389 }
2390 }
2391 else
2392 {
2393
2395 if (objectTarget == nullptr)
2396 continue;
2397
2398 if (!objectTarget->isGameObject() || objectTarget->getEntry() != entryId)
2400
2401
2402 if (!
m_caster->
isInRange(objectTarget->GetPositionX(), objectTarget->GetPositionY(), objectTarget->GetPositionZ(), range * range))
2404
2405
2407 foundTarget = true;
2408 break;
2409 }
2410 }
2411
2412 if (!foundTarget)
2414 }
2415
2416
2417
2418
2421 return scriptCheck;
2422
2423
2424
2425
2427 {
2429 {
2432 {
2433 if (target == nullptr)
2435 if (target->isAlive())
2437#if VERSION_STRING >= WotLK
2439 return SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED;
2440#endif
2441 } break;
2444 {
2446 break;
2447
2449 {
2451 {
2452
2454 {
2457 }
2458 }
2459 else
2460 {
2462 }
2463 }
2464
2467 } break;
2470 {
2472 break;
2473
2474
2477 } break;
2480 {
2482 break;
2483
2486 {
2488 if (objectTarget != nullptr &&
2493 {
2494
2495 switch (objectTarget->getGoType())
2496 {
2499 break;
2501 lockId = objectTarget->GetGameObjectProperties()->button.lock_id;
2502 break;
2503
2504
2506 lockId = objectTarget->GetGameObjectProperties()->chest.lock_id;
2507 break;
2509 lockId = objectTarget->GetGameObjectProperties()->trap.lock_id;
2510 break;
2512 lockId = objectTarget->GetGameObjectProperties()->goober.lock_id;
2513 break;
2514
2515
2517 lockId = objectTarget->GetGameObjectProperties()->camera.lock_id;
2518 break;
2519
2520
2522 lockId = objectTarget->GetGameObjectProperties()->fishinghole.lock_id;
2523 break;
2524
2525
2526 default:
2527 break;
2528 }
2529
2530 if (lockId == 0)
2532 }
2533 }
2535 {
2536 Item const* targetItem =
nullptr;
2538 {
2540 if (playerTrader != nullptr)
2542 }
2543 else
2544 {
2546 }
2547
2548 if (targetItem == nullptr)
2550
2551
2554
2556 }
2557
2558 if (lockId == 0)
2559 break;
2560
2561 const auto lockInfo =
sLockStore.lookupEntry(lockId);
2562 if (lockInfo == nullptr)
2564
2565 auto successfulOpening = false;
2567 {
2568
2570 {
2571 if (
i_caster ==
nullptr || lockInfo->lockmisc[x] == 0)
2572 continue;
2573
2575 {
2576 successfulOpening = true;
2577 break;
2578 }
2579 }
2580
2582 {
2583
2585 continue;
2586
2587
2589 switch (lockInfo->lockmisc[x])
2590 {
2591#if VERSION_STRING <= WotLK
2594 break;
2595#endif
2598 break;
2601 break;
2604 break;
2605#if VERSION_STRING >= WotLK
2608 break;
2609#endif
2610 default:
2611 break;
2612 }
2613
2615 {
2616
2618
2620
2621
2622 if (skillLevel < lockInfo->minlockskill[x])
2624
2625#if VERSION_STRING >= WotLK
2626
2628 {
2630 {
2632 return SPELL_FAILED_CUSTOM_ERROR;
2633 }
2634 }
2635#endif
2636
2637#if VERSION_STRING < Cata
2638
2639
2641#if VERSION_STRING < WotLK
2643#endif
2644 ))
2645 {
2646
2647
2648 const auto skillDifference = skillLevel - lockInfo->minlockskill[
x];
2650
2651
2652 if (skillDifference < 5)
2653 failChance = 50;
2654 else if (skillDifference < 10)
2655 failChance = 35;
2656 else if (skillDifference < 15)
2657 failChance = 20;
2658 else if (skillDifference < 20)
2659 failChance = 10;
2660 else if (skillDifference < 25)
2661 failChance = 5;
2662
2665 }
2666#endif
2667 }
2668
2669 successfulOpening = true;
2670 break;
2671 }
2672 }
2673
2674 if (!successfulOpening)
2676 } break;
2678 {
2680 break;
2681 }
2682 [[fallthrough]];
2684 {
2686 break;
2687
2689 if (pet == nullptr)
2691
2693 if (newSpell == nullptr)
2695
2698 return learnStatus;
2699 } break;
2702 {
2704 break;
2705
2706 if (target == nullptr)
2708
2709
2711 break;
2712
2713
2714 if (target->getMaxPower(target->getPowerType()) == 0 || target->getPowerType() !=
static_cast<uint8_t>(
getSpellInfo()->getEffectMiscValue(i)))
2716 } break;
2718 {
2721
2722 if (!target->isCreature())
2724
2725
2726 if (
dynamic_cast<Creature*
>(target)->IsPickPocketed())
2728
2729 const auto itr =
sLootMgr.getPickpocketingLoot().find(target->getEntry());
2730 if (itr ==
sLootMgr.getPickpocketingLoot().end())
2732 } break;
2733#if VERSION_STRING >= WotLK
2735 {
2738
2741 if (glyphEntry == nullptr)
2742 return SPELL_FAILED_INVALID_GLYPH;
2743
2744
2746 return SPELL_FAILED_GLYPH_SOCKET_LOCKED;
2747
2748
2750 return SPELL_FAILED_UNIQUE_GLYPH;
2751 } break;
2752#endif
2754 {
2756 break;
2757
2760
2763
2766
2767
2770
2774
2775 if (targetPlayer != nullptr && targetPlayer->getDuelPlayer() != nullptr)
2777 } break;
2779 {
2782
2783 const auto targetPlayer =
dynamic_cast<Player*
>(target);
2784
2787
2788
2790 {
2793
2796 {
2797 if (mapInfo->minlevel_heroic > targetPlayer->getLevel())
2799 }
2800 else
2801 {
2802 if (mapInfo->minlevel > targetPlayer->getLevel())
2804 }
2805
2806
2808 {
2809#if VERSION_STRING == Classic
2811#else
2812 return SPELL_FAILED_NOT_IN_BATTLEGROUND;
2813#endif
2814 }
2815 }
2816 } break;
2818 {
2819#if VERSION_STRING >= WotLK
2821 return SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED;
2822#endif
2823 } break;
2825 {
2828
2829 if (target == nullptr)
2831
2832 if (target->isAlive())
2834
2837
2838
2839 const auto creatureTarget =
dynamic_cast<Creature*
>(target);
2840 if (creatureTarget->Skinned)
2842
2843
2845 {
2847 if (taggerPlayer != nullptr && creatureTarget->HasLootForPlayer(taggerPlayer))
2849 }
2850
2851
2853
2854
2855 const int32_t skillDiff = skillLevel >= 100 ? skillLevel - (creatureTarget->
getLevel() * 5) : (skillLevel + 100) - (creatureTarget->getLevel() * 10);
2856 if (skillDiff < 0)
2858
2859#if VERSION_STRING < WotLK
2860
2861
2862 if (secondCheck)
2863 {
2865
2866
2867 if (skillDiff < 5)
2868 failChance = 50;
2869 else if (skillDiff < 10)
2870 failChance = 35;
2871 else if (skillDiff < 15)
2872 failChance = 20;
2873 else if (skillDiff < 20)
2874 failChance = 10;
2875 else if (skillDiff < 25)
2876 failChance = 5;
2877
2880 }
2881#endif
2882 } break;
2884 {
2887
2890
2891 if (target == nullptr)
2893
2894 if (
worldConfig.terrainCollision.isPathfindingEnabled)
2895 {
2896
2899 }
2900 } break;
2902 {
2905
2907 if (pet == nullptr)
2909
2910 if (!pet->isAlive())
2912
2913
2915 if (foodItem == nullptr)
2917
2918
2920 if (itemProto->FoodType == 0)
2922
2923
2924 if (!(pet->getPetDiet() & (1 << (itemProto->FoodType - 1))))
2926
2927
2928 if (pet->getLevel() > (itemProto->ItemLevel + 30))
2930 } break;
2932 {
2935
2936
2938 {
2940 if (petTarget != nullptr)
2941 {
2942 if (petTarget->isAlive())
2944 }
2945 else
2946 {
2947
2948 auto foundDeadPet = false;
2949 for (
const auto& [petSlot, petId] :
p_caster->getPetCachedSlotMap())
2950 {
2952 break;
2953
2955 if (petCache == nullptr)
2956 continue;
2957
2958 if (!petCache->alive)
2959 {
2960 foundDeadPet = true;
2961
2963 break;
2964 }
2965 }
2966
2967
2968 if (!foundDeadPet)
2970 }
2971 }
2972 } break;
2974 {
2977 } break;
2978 default:
2979 break;
2980 }
2981 }
2982
2983
2984
2985
2987 {
2989 {
2991 {
2994
2995 if (target == nullptr)
2997
3000
3003
3006
3007
3010
3011
3012 if (target->getCharmedByGuid() != 0)
3014
3015
3016 if (!target->isPlayer() && target->getPlayerOwner() != nullptr)
3017 {
3018#if VERSION_STRING == Classic
3020#else
3021 return SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED;
3022#endif
3023 }
3024
3027 } break;
3030 {
3033
3034 if (target == nullptr)
3036
3039
3041 {
3044
3045
3048 }
3049
3050
3053
3054
3055 if (target->getCharmedByGuid() != 0)
3057
3058
3059 if (!target->isPlayer() && target->getPlayerOwner() != nullptr)
3060 {
3061#if VERSION_STRING == Classic
3063#else
3064 return SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED;
3065#endif
3066 }
3067
3070
3071 const auto targetCreature =
dynamic_cast<Creature*
>(target);
3072 if (
p_caster !=
nullptr && target->
isCreature() && targetCreature->isTagged() && !targetCreature->isTaggedByPlayerOrItsGroup(
p_caster))
3074 } break;
3076 {
3077
3079 break;
3080
3083 } break;
3085 {
3086 if (target == nullptr)
3088
3089
3092
3093 if (target->isPlayer())
3094 {
3095
3097 if (mainHandWeapon == nullptr || !mainHandWeapon->isWeapon())
3099 }
3100 else
3101 {
3102 if (
const auto creature =
dynamic_cast<Creature*
>(target))
3103 {
3104 if (const auto creatureProto = creature->GetCreatureProperties())
3105 {
3109 }
3110 }
3111
3112
3113#if VERSION_STRING < WotLK
3114 if (target->getVirtualItemDisplayId(
MELEE) == 0)
3115#else
3116 if (target->getVirtualItemSlotId(
MELEE) == 0)
3117#endif
3119 }
3120 } break;
3122 {
3123 if (
worldConfig.terrainCollision.isCollisionEnabled)
3124 {
3127 }
3128
3130 {
3131#if VERSION_STRING == Cata
3134#endif
3135
3138
3140 {
3143 }
3144
3145
3147 {
3149 {
3166 {
3169 } break;
3170 default:
3171 break;
3172 }
3173 }
3174 }
3175 } break;
3177 {
3180
3183
3186
3188 if (petTarget == nullptr)
3190
3191 if (petTarget->getCharmedByGuid() != 0)
3193 } break;
3194#if VERSION_STRING >= TBC
3197 {
3199 {
3202 }
3203 } break;
3205 {
3206
3207 if (target == nullptr)
3209
3212
3213
3216 } break;
3217#endif
3218 default:
3219 break;
3220 }
3221 }
3222
3224 {
3227
3228
3231
3232
3235
3236
3238 if (!tradeData->isTradeAccepted() || !tradeData->getTargetTradeData()->isTradeAccepted())
3239 {
3240
3243 }
3244 }
3245
3246
3248}
@ SPELL_AURA_PREVENT_RESURRECTION
@ SPELL_AURA_MIRROR_IMAGE
@ SPELL_AURA_PERIODIC_MANA_LEECH
@ SPELL_AURA_MOD_POSSESS_PET
@ SPELL_AURA_SPIRIT_OF_REDEMPTION
@ SPELL_AURA_ALLOW_TAME_PET_TYPE
@ SPELL_AURA_IGNORE_SHAPESHIFT
@ SPELL_AURA_IGNORE_TARGET_AURA_STATE
@ SPELL_AURA_ENABLE_FLIGHT2
@ AURA_INTERRUPT_ON_STAND_UP
@ CREATURE_FLAG1_TAMEABLE
@ GAMEOBJECT_TYPE_SPELL_FOCUS
@ GAMEOBJECT_TYPE_FISHINGHOLE
@ GAMEOBJECT_TYPE_FLAGDROP
@ GAMEOBJECT_TYPE_QUESTGIVER
@ GAMEOBJECT_TYPE_FLAGSTAND
@ GAMEOBJECT_TYPE_AREADAMAGE
@ EQUIPMENT_SLOT_MAINHAND
@ PET_SLOT_MAX_ACTIVE_SLOT
@ PET_SLOT_MAX_TOTAL_PET_COUNT
@ TARGET_FLAG_UNIT_CORPSE
@ ATTRIBUTESEXE_SKIP_LINE_OF_SIGHT_CHECK
@ ATTRIBUTESEXD_NOT_IN_ARENAS
@ ATTRIBUTESEXD_ONLY_IN_OUTLANDS
@ ATTRIBUTESEXG_IS_CHEAT_SPELL
@ ATTRIBUTESEXG_IGNORE_COLD_WEATHER_FLYING
@ ATTRIBUTESEXB_UNAFFECTED_BY_SCHOOL_IMMUNITY
@ ATTRIBUTESEXB_REQ_BEHIND_TARGET
@ ATTRIBUTESEXB_IGNORE_LINE_OF_SIGHT
@ ATTRIBUTESEXB_TAME_BEAST
@ ATTRIBUTESEXB_CANT_TARGET_TAGGED
@ ATTRIBUTESEXB_CAN_BE_CASTED_ON_DEAD_TARGET
@ ATTRIBUTESEXB_REQ_DEAD_PET
@ ATTRIBUTESEXF_CAN_TARGET_INVISIBLE
@ ATTRIBUTESEXF_NOT_IN_RAIDS_OR_HEROIC_DUNGEONS
@ ATTRIBUTESEX_REQ_OOC_TARGET
@ ATTRIBUTESEX_CANT_TARGET_SELF
@ ATTRIBUTESEX_REQ_FACING_TARGET
@ ATTRIBUTESEX_DISMISS_CURRENT_PET
@ ATTRIBUTESEXC_TARGET_ONLY_GHOSTS
@ ATTRIBUTES_STOP_ATTACK
\ todo: implement
@ ATTRIBUTES_NOT_SHAPESHIFT
@ ATTRIBUTES_MOUNT_CASTABLE
@ ATTRIBUTES_ONLY_INDOORS
@ ATTRIBUTES_CASTABLE_WHILE_SITTING
@ ATTRIBUTES_DEAD_CASTABLE
@ ATTRIBUTES_ONLY_OUTDOORS
@ SPELL_EFFECT_POWER_BURN
@ SPELL_EFFECT_SUMMON_PET
@ SPELL_EFFECT_OPEN_LOCK_ITEM
@ SPELL_EFFECT_SELF_RESURRECT
@ SPELL_EFFECT_SUMMON_PLAYER
@ SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER
@ SPELL_EFFECT_PICKPOCKET
@ SPELL_EFFECT_RESURRECT_FLAT
@ SPELL_EFFECT_POWER_DRAIN
@ SPELL_EFFECT_SUMMON_DEAD_PET
@ SPELL_EFFECT_LEARN_SPELL
@ SPELL_EFFECT_SPELL_STEAL
@ SPELL_EFFECT_LEARN_PET_SPELL
@ SPELL_FAILED_TARGET_NOT_LOOTED
@ SPELL_FAILED_UNIT_NOT_INFRONT
@ SPELL_FAILED_NOT_INFRONT
@ SPELL_FAILED_NOT_MOUNTED
@ SPELL_FAILED_AFFECTING_COMBAT
@ SPELL_FAILED_CASTER_AURASTATE
@ SPELL_FAILED_TARGET_NOT_PLAYER
@ SPELL_FAILED_FOOD_LOWLEVEL
@ SPELL_FAILED_NOT_STANDING
@ SPELL_FAILED_TARGET_NOT_DEAD
@ SPELL_FAILED_WRONG_PET_FOOD
@ SPELL_FAILED_BAD_IMPLICIT_TARGETS
@ SPELL_FAILED_NO_COMBO_POINTS
@ SPELL_FAILED_ALREADY_HAVE_SUMMON
@ SPELL_FAILED_ALREADY_OPEN
@ SPELL_FAILED_NOT_TRADING
@ SPELL_FAILED_TARGET_NO_POCKETS
@ SPELL_FAILED_NO_MOUNTS_ALLOWED
@ SPELL_FAILED_ITEM_NOT_FOUND
@ SPELL_FAILED_OUT_OF_RANGE
@ SPELL_FAILED_TARGET_DUELING
@ SPELL_FAILED_CANT_DUEL_WHILE_STEALTHED
@ SPELL_FAILED_NOT_BEHIND
@ SPELL_FAILED_ALREADY_HAVE_CHARM
@ SPELL_FAILED_TARGET_NOT_IN_INSTANCE
@ SPELL_FAILED_DONT_REPORT
@ SPELL_FAILED_CANT_CAST_ON_TAPPED
@ SPELL_FAILED_TARGET_AURASTATE
@ SPELL_FAILED_TARGET_NOT_IN_RAID
@ SPELL_FAILED_ONLY_BATTLEGROUNDS
@ SPELL_FAILED_ONLY_STEALTHED
@ SPELL_FAILED_CANT_DUEL_WHILE_INVISIBLE
@ SPELL_FAILED_TARGETS_DEAD
@ SPELL_FAILED_AURA_BOUNCED
@ SPELL_FAILED_UNIT_NOT_BEHIND
@ SPELL_FAILED_CANT_BE_CHARMED
@ SPELL_FAILED_TARGET_NOT_GHOST
@ SPELL_FAILED_CASTER_DEAD
@ SPELL_FAILED_NO_DUELING
@ SPELL_FAILED_TARGET_UNSKINNABLE
@ SPELL_FAILED_TARGET_NO_WEAPONS
@ SPELL_FAILED_ONLY_OUTDOORS
@ SPELL_FAILED_LOW_CASTLEVEL
@ SPELL_FAILED_NOT_ON_TRANSPORT
@ SPELL_FAILED_LINE_OF_SIGHT
@ SPELL_FAILED_REQUIRES_SPELL_FOCUS
@ SPELL_FAILED_REQUIRES_AREA
@ SPELL_FAILED_TARGET_AFFECTING_COMBAT
@ SPELL_FAILED_ONLY_INDOORS
@ SPELL_FAILED_NOT_ON_TAXI
@ PETTAME_CREATUREALREADYOWNED
@ PETTAME_CANTCONTROLEXOTIC
@ PETTAME_INVALIDCREATURE
@ PETTAME_ANOTHERSUMMONACTIVE
@ SPELL_EXTRA_ERROR_NORTHREND_MINING
@ SPELL_EXTRA_ERROR_GM_ONLY
@ SPELL_INFRONT_STATUS_REQUIRE_INBACK
@ SUMMON_CONTROL_TYPE_PET
@ AURA_CHECK_RESULT_HIGHER_BUFF_PRESENT
@ FORM_SPIRITOFREDEMPTION
SERVER_DECL WDB::WDBContainer< WDB::Structures::GlyphPropertiesEntry > sGlyphPropertiesStore
SERVER_DECL WDB::WDBContainer< WDB::Structures::SummonPropertiesEntry > sSummonPropertiesStore
SERVER_DECL WDB::WDBContainer< WDB::Structures::CreatureFamilyEntry > sCreatureFamilyStore
SERVER_DECL WDB::WDBContainer< WDB::Structures::LockEntry > sLockStore
SERVER_DECL WDB::WDBContainer< WDB::Structures::AreaGroupEntry > sAreaGroupStore
bool canCreatePath(float x, float y, float z)
MySQLStructure::MapInfo const * getMapInfo() const
bool isBattleground() const
bool HasMember(Player *pPlayer)
ItemProperties const * getItemProperties() const
static WDB::Structures::AreaTableEntry const * GetAreaById(uint32_t area_id)
static bool IsOutdoor(uint32_t mapId, float x, float y, float z)
GameObject * getGameObjectNearestCoords(float x, float y, float z=0.0f, uint32_t Entry=0)
bool isInFront(Object *target)
::WDB::Structures::AreaTableEntry const * GetArea() const
Transporter * GetTransport() const
LocationVector & GetPositionNC()
uint32_t GetMapId() const
Player * getWorldMapPlayer(const uint64_t &guid) const
bool IsWithinLOSInMap(Object *obj)
const uint32_t & getZoneId() const
bool IsWithinLOS(LocationVector location)
bool IsInMap(Object *obj)
SpellCastResult canLearnSpell(SpellInfo const *spellInfo) const
uint32_t getGlyphsEnabled() const
uint8_t getPetCount() const
uint16_t getSkillLineCurrent(uint16_t skillLine, bool includeBonus=true) const
TradeData * getTradeData() const
std::optional< uint8_t > findFreeActivePetSlot() const
PetCache const * getPetCache(uint8_t petId) const
bool hasSpellGlobalCooldown(SpellInfo const *spellInfo)
bool hasPlayerFlags(uint32_t flags) const
bool canUseFlyingMountHere()
bool hasSpellOnCooldown(SpellInfo const *spellInfo)
WorldSession * getSession() const
void sendMountResultPacket(uint32_t result)
uint32_t getCategoryRecoveryTime() const
int32_t getEffectMiscValueB(uint8_t idx) const
uint32_t getAttributesExB() const
bool hasEffect(uint32_t effect) const
uint32_t getAttributesExC() const
uint32_t getRequiredTargetMask(bool getExplicitMask) const
int32_t getRequiresAreaId() const
uint32_t getRecoveryTime() const
uint32_t getDispelType() const
bool hasExplicitTarget(uint32_t value) const
int32_t calculateEffect(uint8_t effIndex)
void setTargetConstraintCreature(Creature *_creature)
void SendTameFailure(uint8_t failure)
SpellCastResult checkItems(uint32_t *parameter1, uint32_t *parameter2) const
SpellCastResult checkShapeshift(SpellInfo const *spellInfo, const uint32_t shapeshiftForm) const
SpellCastResult checkCasterState() const
void setTargetConstraintGameObject(GameObject *_gameobject)
bool canAttackCreatureType(Creature *target) const
SpellCastResult checkRange(const bool secondCheck)
SpellCastResult checkPower()
void setTradeSpell(uint32_t spell_id, Item *cast_item=nullptr)
bool hasAuraState(AuraState state, SpellInfo const *spellInfo=nullptr, Unit const *caster=nullptr) const
uint64_t getTargetGuid() const
uint64_t getCharmGuid() const
uint64_t getTaggerGuid() const
WDB::Structures::MountCapabilityEntry const * getMountCapability(uint32_t mountType)
bool canSee(Object *const obj)
uint8_t getShapeShiftForm() const
bool hasAuraWithAuraEffect(AuraEffect type) const
AIInterface * getAIInterface() const
uint32_t getLevel() const
CombatHandler & getCombatHandler()
BaseMap * getBaseMap() const
bool HasGMPermissions() const
struct GameObjectProperties::@162::@164 door